.DESCRIPTION
  EZDOK Camera for flight simulator restart script
  Copyright (C) 2014  Radek Henys
  
  The purpose of this script is to kill and start again EZDOK (EZCA) camera utility if it is used
  together with FreeTrack (because this combination makes EZCA crash after some time).
  In simple terms, the script does this:
  
	* Check if FreeTrack and EZCA are running. 
	* Check of EZCA memory usage.
	* Sending a keystroke to simulator.
	* Termination of EZCA process.
	* Start of EZCA process.
	* Setting of EZCA process priority.
	* Setting of EZCA process affinity.
	* Keeping simulator window foreground.
	* Maximization, restoration or switching to full-screen or exclusive full-screen of flight simulator main window.  
  
  For more details, please see this page: http://mouseviator.com/pc-creations/ezca-and-freetrack-restart-script-v-2-0b/
  and/or read the comments in the ezca_restart.lua script file. (comments are enclosed by --[[  and ]]-- and/or start with --)
  
.INSTALLATION
  
  Copy all the files to your Modules folder inside your flight simulator folder (C:\FSX\Modules for example).
  So among other files, there will be those files:
 
	lua\MouseviatorHelper.dll  a lua folder with MouseviatorHelper.dll  the helper library I wrote in C++ for EZCA restart script.
	lua\MouseviatorHelper-ReferenceManual.pdf  a reference manual listing all functions currently provided by MouseviatorHelper.dll.
	lua\MouseviatorHelper-License.txt - a MouseviatorHelper.dll license (just a copy of LGPL v3 license).
	dll\Lua5.1.dll  a Lua library used by MouseviatorHelper.dll.
	ezca_restart.lua  the EZCA Restart Script.
	ezca_restart-License.txt - an EZCA Restart script license (just a copy of LGPL v3 license).
	ezca_restart-Readme.txt - this Readme (Optional, this one is really NOT required)

  in your Modules folder.
  
  Than you need to somehow execute the script. I recommend that you set it to run automatically with flight simulator. 
  Here comes the two possible solutions on how to do that. One:

  a) Add or edit [Auto] section to your FSUIPC4.ini

	Open your FSUIPC4.ini with text editor (can be simple notepad) and find section named [Auto]. In this section, add line:

		1=Lua ezca_restart
	
	If you already have this section and some script in there, then change the number "1" to the number following right after 
	the last number in this section. For example, if your [Auto] section looks like this:

		[Auto]
		1=Lua linda
	
	than change it like that:

		[Auto]
		1=Lua linda
		2=Lua ezca_restart
	
	If you don't have [Auto] section in the file, just add this to the end of the ini file:

		[Auto]
		1=Lua ezca_restart
   
   b) Create or edit ipcReady.lua in your Modules folder.

	If you do not have a file called ipcReady.lua in your Modules folder, create one with notepad. The .lua file is simple text file, 
	it just have .lua extension. So create an empty text file and save it as ipcReady.lua (you must select "Save as type: All files" when saving, 
	otherwise it will end up in: ipcReady.lua.txt).

	Add this line of code to the ipcReady.lua:

		ipc.runlua("ezca_restart")
  
.LICENSE
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.
  
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU Lesser General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

.NOTES
  Author: Radek Henys (admin@mouseviator.com)
  Version: 1.0b
  Last update: 16.4.2014
  License: LGPL v3